//
import type { ResultParams } from '@/types/global'
import type { goodsSpuData, homeResData, homeSettingData } from '@/types/home'
import { http } from '@/utils/http'

export default {
  getHomeDataApi: (templateId: string) => {
    //获取装修楼层数据
    return http<homeResData>({
      method: 'GET',
      url: '/v1/shop/decorate/noAuth/getPageDataByWeb',
      data: {
        company_id_: 1,
        type: 'home',
        template_id_: templateId ? templateId : '',
      },
    })
  },
  // 获取店铺装修商品
  searchListForDecorateApi: (params: homeSettingData) => {
    return http<ResultParams<goodsSpuData>>({
      method: 'GET',
      url: '/v1/shop/decorate/noAuth/searchListForDecorate',
      data: {
        goods_type_: 1,
        webApp_: 1,
        floor: 21,
        company_id_: 1,
        goods_num_: 16,
        ...params,
      },
    })
  },
}
